# 案例一 排序+去重
import random


def generateNum(length):
    nums = []
    while len(nums) < length:
        num = random.randint(1, 1000)
        nums.append(num)
    s = set(nums)
    nums = list(s)
    nums.sort()
    nums.reverse()
    print(nums)
    return nums


if __name__ == "__main__":
    length = int(input("请输入一个数值\n"))
    generateNum(length)
